﻿namespace _5._5._02.IfStatementRefactoring
{
    using System;

    internal class IfStatementRefactoringMain
    {
        private static void Main()
        {
            Potato potatoSample = new Potato();

            if (potatoSample != null)
            {
                if (potatoSample.HasBeenPeeled && potatoSample.IsNotRotten)
                {
                    Cook(potatoSample);
                }
            }

            int x = 0;
            int y = 0;

            int minX = 0;
            int maxX = 0;
            int minY = 0;
            int maxY = 0;

            bool shouldVisitCell = true;

            bool xIsInRange = (x >= minX && x <= maxX);
            bool yIsInRange = (minY >= y && maxY <= y);

            if (xIsInRange && yIsInRange && shouldVisitCell)
            {
                VisitCell();
            }
        }

        private static void VisitCell()
        {
            throw new NotImplementedException();
        }

        private static void Cook(Potato potato)
        {
            throw new NotImplementedException();
        }
    }
}